home *** CD-ROM | disk | FTP | other *** search
- #include "my color.h"
-
- void adjust_scroll_bars(whichWindow) /* this routine is called from the "do mouse" routine.
- Here I will re-size and move the scroll bars
- if the user has "grown" the window */
- CWindowPtr whichWindow;
- {
- ControlHandle control;
-
- control = ((CWindowPeek)whichWindow)->controlList;
- while(control)
- {
- if((*control)->contrlRfCon == HORIZONTAL_SCROLL)
- {
- MoveControl(control, (*control)->contrlOwner->portRect.left - ONE_PIXEL,
- (*control)->contrlOwner->portRect.bottom - BAR_WIDTH + ONE_PIXEL);
- SizeControl(control, (*control)->contrlOwner->portRect.right - BAR_WIDTH + 2,
- BAR_WIDTH);
- }
- else if((*control)->contrlRfCon == VERTICLE_SCROLL)
- {
- MoveControl(control, (*control)->contrlOwner->portRect.right - BAR_WIDTH + ONE_PIXEL,
- (*control)->contrlOwner->portRect.top - ONE_PIXEL);
- SizeControl(control, BAR_WIDTH,
- (*control)->contrlOwner->portRect.bottom - BAR_WIDTH + 2);
- }
- control = (*control)->nextControl;
- }
- }
-